<?php
namespace Shared\Main;

use Doctrine\ORM\Mapping as ORM;

/**
 * Description of Product
 *
 * @author nofear
 */

/**
 * @ORM\Entity
 * @ORM\Table(name="products")
 */
class Product extends SiteObject {
    
    /**
     * @ORM\Column
     */
    private $name;
    
    /**
     * @ORM\Column
     */
    private $url;
    
    /**
     * @ORM\Column(type="text")
     */
    private $description;
    
    /**
     * @ORM\OneToOne(targetEntity="Metadata")
     * @ORM\JoinColumn(name="metadataId", referencedColumnName="id")
     */
    private $MetaData;
    
    /**
     * @ORM\OneToOne(targetEntity="Category")
     * @ORM\JoinColumn(name="categoryId", referencedColumnName="id")
     */
    private $Category;
    
    /**
     * @ORM\Column(type="boolean")
     */
    private $inStock;
    
    public function getName() {
        return $this->name;
    }

    public function getUrl() {
        return $this->url;
    }

    public function getDescription() {
        return $this->description;
    }

    public function getMetaData() {
        return $this->MetaData;
    }

    public function setName($name) {
        $this->name = $name;
    }

    public function setUrl($url) {
        $this->url = $url;
    }

    public function setDescription($description) {
        $this->description = $description;
    }

    public function setMetaData($MetaData) {
        $this->MetaData = $MetaData;
    }
    
    public function getCategory() {
        return $this->Category;
    }

    public function setCategory($Category) {
        $this->Category = $Category;
    }
    
    public function getInStock() {
        return $this->inStock;
    }

    public function setInStock($inStock) {
        $this->inStock = $inStock;
    }
}
